<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<script type="text/javascript">

$(document).ready(function(){
	$("ul li:eq(6)").addClass("active");
	$('.datatable').dataTable( {        				
		 "oLanguage": {
				"sUrl": "/DormManage/media/zh_CN.json"
		 },
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"aoColumns": [
			null,
			null,
			null,
			{ "asSorting": [ ] },
			null,
			{ "asSorting": [ ] },
		]
	});
});

window.onload = function(){ 
	$("#DataTables_Table_0_wrapper .row-fluid").remove();
};

function ss(){

alert("已处理，无需操作");
}
</script>
<style type="text/css">
	.span6 {
		width:0px;
		height: 0px;
		padding-top: 0px;
		padding-bottom: 0px;
		margin-top: 0px;
		margin-bottom: 0px;
	}

</style>
<div class="data_list">
		<div class="data_list_title">
			报修管理
		</div>
		

		<div >
			<table class="table table-striped table-bordered table-hover datatable" >
				<thead>
					<tr>
					<th width="8%">编号</th>
					<th width="18%">日期</th>
					<th>联系人</th>
					<th>联系方式</th>
					<th>寝室号</th>
					<th>报修内容</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				<c:forEach  varStatus="i" var="repairList" items="${repairList }">
					
			<c:if test="${repairList.end==0}">
					<tr>
					 <td>${i.count}</td>
						<td>${repairList.date}</td>
						<td>${repairList.name }</td>
						<td>${repairList.tel }</td>
						<td>${repairList.room }</td>
						<td>${repairList.content }</td>
						
						<td id="temp">  
						<font color="red">
						
 				 			  <c:out value="未处理"/>
 				 			  
											</font>
											

						<td>
							<button class="btn btn-mini btn-success" type="button" onclick="javascript:window.location='repair?action=end&id=${repairList.id }'">处理</button>
						</td>
					</tr></c:if>
				</c:forEach>
				</tbody>
				
				<tbody>
				<c:forEach  varStatus="i" var="repairList" items="${repairList }">
					
			<c:if test="${repairList.end==1}">
					<tr>
					 <td>${i.count}</td>
						<td>${repairList.date}</td>
						<td>${repairList.name }</td>
						<td>${repairList.tel }</td>
						<td>${repairList.room }</td>
						<td>${repairList.content }</td>
						
						<td id="temp">  
						<font color="pink">
						
 				 			  <c:out value="已处理"/>
 				 			  
											</font>
											

						<td>
							<button class="btn btn-mini btn-success" type="button" onclick="ss()">处理</button> 
						</td>
					</tr></c:if>
				</c:forEach>
				</tbody>
				
			</table>
		</div>
		<div align="center"><font color="red">${error }</font></div>
</div>